import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { AppCommonModule } from '@app/shared/common/app-common.module';
import { UtilsModule } from '@shared/utils/utils.module';
import { CountoModule } from 'angular2-counto';
import { ModalModule, TabsModule, TooltipModule, BsDropdownModule, PopoverModule } from 'ngx-bootstrap';

import { NgxChartsModule } from '@swimlane/ngx-charts';
import { TableModule } from 'primeng/table';
import { TreeModule } from 'primeng/tree';
import { BsDatepickerModule, BsDatepickerConfig, BsDaterangepickerConfig, BsLocaleService } from 'ngx-bootstrap/datepicker';
import { NgxBootstrapDatePickerConfigService } from 'assets/ngx-bootstrap/ngx-bootstrap-datepicker-config.service';
import { LightboxModule } from 'primeng/lightbox';
import { AdminModule } from '../admin/admin.module';
import { ToggleButtonModule } from 'primeng/togglebutton';
import { ButtonModule } from 'primeng/button';
import {
    AutoCompleteModule,
    CardModule,
    ContextMenuModule,
    DragDropModule,
    EditorModule,
    FileUploadModule,
    InputMaskModule,
    MultiSelectModule,
    PaginatorModule,
    TabViewModule,
    CalendarModule
} from 'primeng/primeng';
import { TextMaskModule } from 'angular2-text-mask';
import { ImageCropperModule } from 'ngx-image-cropper';
import { ChipsModule } from 'primeng/chips';
import { TreeTableModule } from 'primeng/treetable';
import { DialogModule } from 'primeng/dialog';
import { SidebarModule } from 'primeng/sidebar';
import { TriStateCheckboxModule } from 'primeng/tristatecheckbox';

import { WarehouseRoutingModule } from './warehouse-routing.module';
import { WarehousingComponent } from './warehousing/warehousing.component';
import { AddCertificateComponent } from './warehousing/add-certificate/add-certificate.component';
import { AddReleaseComponent } from './warehousing/add-release/add-release.component';
import { ManualAddCertificateComponent } from './warehousing/manual-add-certificate/manual-add-certificate.component';
import { BatchWarehousingComponent } from './warehousing/batch-warehousing/batch-warehousing.component';
import { UpdateCertificateComponent } from './warehousing/update-certificate/update-certificate.component';
import { UpdateReleaseComponent } from './warehousing/update-release/update-release.component';
import { ManualUpdateCertificateComponent } from './warehousing/manual-update-certificate/manual-update-certificate.component';
import { AddShowResumeComponent } from './warehousing/add-show-resume/add-show-resume.component';
import { WarehouseMsgComponent } from './warehouse-msg/warehouse-msg.component';
import { ReleaseMsgComponent } from './warehouse-msg/release-msg/release-msg.component';
import { CertificateMsgComponent } from './warehouse-msg/certificate-msg/certificate-msg.component';
import { ManualMsgComponent } from './warehouse-msg/manual-msg/manual-msg.component';
import { SupplementaryCertificateComponent } from './warehouse-msg/supplementary-certificate/supplementary-certificate.component';
import { ExWarehouseComponent } from './ex-warehouse/ex-warehouse.component';
import { MatingExWarehouseComponent } from './ex-warehouse/mating-ex-warehouse/mating-ex-warehouse.component';
import { AddExComponent } from './ex-warehouse/add-ex/add-ex.component';
import { ScrapExComponent } from './ex-warehouse/scrap-ex/scrap-ex.component';
import { RepairExComponent } from './ex-warehouse/repair-ex/repair-ex.component';
import { RejectExComponent } from './ex-warehouse/reject-ex/reject-ex.component';
import { BackWarehouseComponent } from './ex-warehouse/back-warehouse/back-warehouse.component';
import { ExWarehouseRecordComponent } from './ex-warehouse-record/ex-warehouse-record.component';
import { MatchingWatchComponent } from './warehouse-msg/matching-watch/matching-watch.component';
import { ReturnWarehouseComponent } from './ex-warehouse/return-warehouse/return-warehouse.component';
import { WarehouseInventoryComponent } from './warehouse-inventory/warehouse-inventory.component';
import { InventoryComponent } from './warehouse-inventory/inventory/inventory.component';
import { InventoryRecordComponent } from './warehouse-inventory/inventory-record/inventory-record.component';
import { ScanCoedeComponent } from './warehousing/scan-coede/scan-coede.component';

@NgModule({
    imports: [
        CommonModule,
        WarehouseRoutingModule,
        TriStateCheckboxModule,
        SidebarModule,
        DialogModule,
        TreeTableModule,
        CommonModule,
        CommonModule,
        ModalModule,
        TabsModule,
        TooltipModule,
        AppCommonModule,
        UtilsModule,
        CountoModule,
        NgxChartsModule,
        BsDatepickerModule.forRoot(),
        BsDropdownModule.forRoot(),
        TableModule,
        PaginatorModule,
        AdminModule,
        FormsModule,
        ReactiveFormsModule,
        CommonModule,
        FileUploadModule,
        ModalModule.forRoot(),
        TabsModule.forRoot(),
        TooltipModule.forRoot(),
        PopoverModule.forRoot(),
        BsDropdownModule.forRoot(),
        BsDatepickerModule.forRoot(),
        UtilsModule,
        AppCommonModule,
        TableModule,
        TreeModule,
        DragDropModule,
        ContextMenuModule,
        PaginatorModule,
        AutoCompleteModule,
        EditorModule,
        InputMaskModule,
        NgxChartsModule,
        CountoModule,
        TextMaskModule,
        ImageCropperModule,
        TabViewModule,
        CardModule,
        MultiSelectModule,
        CalendarModule,
        LightboxModule,
        ToggleButtonModule,
        ButtonModule,
        ChipsModule
    ],
    declarations: [
    WarehousingComponent,
    AddCertificateComponent,
    AddReleaseComponent,
    ManualAddCertificateComponent,
    BatchWarehousingComponent,
    UpdateCertificateComponent,
    UpdateReleaseComponent,
    ManualUpdateCertificateComponent,
    AddShowResumeComponent,
        WarehouseMsgComponent,
        ReleaseMsgComponent,
        CertificateMsgComponent,
        ManualMsgComponent,
        SupplementaryCertificateComponent,
        ExWarehouseComponent,
        MatingExWarehouseComponent,
        AddExComponent,
        ScrapExComponent,
        RepairExComponent,
        RejectExComponent,
        BackWarehouseComponent,
        ExWarehouseRecordComponent,
        MatchingWatchComponent,
        ReturnWarehouseComponent,
        WarehouseInventoryComponent,
        InventoryComponent,
        InventoryRecordComponent,
        ScanCoedeComponent,
    ],
    providers: [
        { provide: BsDatepickerConfig, useFactory: NgxBootstrapDatePickerConfigService.getDatepickerConfig },
        { provide: BsDaterangepickerConfig, useFactory: NgxBootstrapDatePickerConfigService.getDaterangepickerConfig },
        { provide: BsLocaleService, useFactory: NgxBootstrapDatePickerConfigService.getDatepickerLocale }
    ]
})
export class WarehouseModule { }
